import { useRecoilState } from 'recoil';
import { userSelector } from '@/store/user';

const useCheckAuth = () => {
    const [user] = useRecoilState(userSelector);
    const { auth } = user;
    return {
        checkAuth: (code: string) => {
            return auth.includes(code);
        },
    };
};
export default useCheckAuth;
